package com.digitalchina.lxnsy.activity.old;

import android.os.Bundle;
import android.view.View;

import com.digitalchina.lxnsy.R;
import com.digitalchina.lxnsy.base.BaseActivity;
import com.digitalchina.lxnsy.constant.Constant;
import com.digitalchina.lxnsy.toolkit.GotoUtil;

import java.util.HashMap;
import java.util.Map;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * ================================================
 * 项目名称：BigData
 * 类描述：
 * 包名：com.digitalchina.bigdata.activity
 * 创建人：郑皓
 * 创建时间：2017/7/18 16:04
 * 修改备注：
 * ================================================
 */
public class RegisterTypeSelectActivity extends BaseActivity {

    private Map<String, String> map;

    @Override
    public void setLayout() {
        setContentLayout(R.layout.activity_register_type_select_new);
        setTitle("注册");
    }

    @Override
    public void initMember() {
        if (getIntent().hasExtra("map"))
            map = (Map<String, String>) getIntent().getSerializableExtra("map");
        else
            map = new HashMap<>();
    }

    @Override
    public void addListener() {

    }

    @Override
    public void setHandler() {

    }

    @Override
    public void callBack(Object object) {

    }

    @Override
    public void rightOnClick() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);
    }


    @OnClick({R.id.layout_user, R.id.layout_expert, R.id.layout_enterprise})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.layout_user:
                map.put("userType", Constant.USER_TYPE_PERSON);
                break;
            case R.id.layout_expert:
                map.put("userType", Constant.USER_TYPE_EXPERT);
                break;
            case R.id.layout_enterprise:
                map.put("userType", Constant.USER_TYPE_ADMIN);
                break;
        }
        GotoUtil.gotoActivity(RegisterTypeSelectActivity.this, RegisterActivity.class, true, "map", map);
    }
}
